<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title><g:layoutTitle default="Grails"/></title>
		
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
		
		<script type="text/javascript" src="${resource(dir:'js', file:'jquery-1.7.2.js') }" ></script>
		<jq:plugin name="cycle" />
		
		
		<g:layoutHead/>
    	<r:layoutResources />
		<nav:resources/>
		
		<style type="text/css" media="screen">
		
			body{
				background:#D9D9D9;
			}
			
			a{
				text-decoration:none;
			}
			
			a.navigation{
				text-decoration:none;
				
				
			}		

			#navBar{
				margin-top:-40px;
				float:right !important;
				position:relative;
				margin-bottom:20px;
				
			}
			
			.navigation{
				font-size:16px;
				padding-left:6px;
				padding-right:6px;
				-moz-border-radius:5px;
				-webkit-border-radius:5px;
				-o-border-radius:5px;
				
				background-color:white;
				color:red !important;
				font-weight:bold;
				
			}			
			
			h1{
				margin-top:10px;
				padding-top:20px;
			}
						
			#footer{
				text-align:center;
				padding-bottom:5px;
				font-size:12px;
			}
			
			#displayUser{
				margin-top:20px;
				float:right !important;	
				position:relative;	
				margin-left:600px;
			}
		</style>
		

		

		
	</head>
	<body>
		<div id="bannerPhoto" style="a:link#FFFFFF; a:hover:#FFFFFF">
			<a href="<g:createLinkTo dir="/"/>">
			<img src = "${createLinkTo(dir:'images', file:'Books.jpg') }" width="960" height="150"/>
			</a>
		</div>

        <div id="navBar">

        	<div id="access">
        		<sec:ifLoggedIn>   
      				<a class="navigation">User: <sec:loggedInUserInfo field="username" /></a>
        			<a class="navigation" href="${createLink(controller:'logout') }">Logout</a>
        			<a class="navigation" href="${createLink(controller:'books', action:'list') }">View Inventory</a>
        			<a class="navigation" href="${createLink(controller:'user', action:'list') }">View Members</a>
        			
        			<sec:ifAllGranted roles="ROLE_ADMIN">
        				<a class="navigation" href="${createLink(controller:'bookRequest', action:'list') }">View Requests</a>
        				<a class="navigation" href="${createLink(controller:'fulfillment', action:'list') }">View Fufillments</a>
        			</sec:ifAllGranted>
        			
        			<sec:ifAnyGranted roles = "ROLE_DONOR, ROLE_BOTH">
        				<a class = "navigation" href="${createLink(controller:'donation', action: 'create') }">Donate Books</a>
        			</sec:ifAnyGranted>
        			
        			
        			
        		
        		</sec:ifLoggedIn>
        		
        		<sec:ifNotLoggedIn> 
        			<a class="navigation" href="${createLink(controller:'login', action:'auth') }">Login</a> 
        			<a class="navigation" href="${createLink(controller:'user', action:'create') }">Register</a>
        			<a class="navigation" href="${createLink(controller:'user', action:'info') }">About Us</a>
        			<a class="navigation" href="${createLink(controller:'bookRequest', action:'list') }">View Requests</a>
        			
        		</sec:ifNotLoggedIn>
        		
        	</div>
        	       	
        </div>
        

        <g:layoutBody/>


        <r:layoutResources />
        
        <div id="footer">
        	Built by: Brad Pare & Jason Johns
        </div>

       </body>
</html>


